using RStudio.UnitSingleton;
using UnityEngine;


namespace RStudio.UIFramwork.Example
{
    /// <summary>
    /// 
    /// </summary>
    public class AppEntry : MonoBehaviour
    {
        private void Start()
        {
            GameService.Instance.Register(new ServiceUI());          
            GameService.Instance.GetService<ServiceUI>().UIEnter.Open<PageEntry>();

            keyCodeListener.OnStateChanged += () =>
            {
                GameService.Instance.GetService<ServiceUI>().UIEnter.Back();
            };
        }


        public KeyCodeListener keyCodeListener;
    }
}